﻿<div class="userBoard pTop5 pBottom5">
    {{? it.type === 'export' }}
    <div class="Font14 mBottom8">{{=_l('用户列表： 已选择%0个用户','<span class="count ThemeColor3">' + it.selected.length + '</span>')}}</div>
    {{?}}
    {{? it.type === 'adjust' }}
    <div class="Font14 mBottom8">{{=_l('用户列表： 已选择%0个用户','<span class="count ThemeColor3">' + it.selected.length + '</span>')}}
        <span class="mLeft30">{{=_l('批量调整至:')}}</span><span class="ThemeColor3 mLeft5 Hand adjustBtn">{{=_l('选择部门')}}</span>
    </div>
    {{?}}
    <div class="tableBox">
        {{?it.list && it.list.length }}
        <table class="w100 usersTable" cellspacing="0">
            <thead>
            {{#def.buildThead:{_type: it.type, isChecked: it.selected && it.selected.length === it.accountIds.length} }}
            </thead>
            <tbody>
            {{#def.buildUserList:{list: it.list, type: it.type, selected: it.selected} }}
            </tbody>
        </table>
        <div class="pager"></div>
        {{??}}
        {{? it.type === 'inActive' }}
        <div class="TxtCenter">{{=_l('没有未激活的成员')}}</div>
        {{?}}
        {{?}}
    </div>
</div>

{{##def.buildThead:param:
{{ var _type = param._type; }}
<tr>
    {{?_type ==='export' || _type ==='adjust'}}
    <th class="checkBox">
        <span class="checkAll TxtMiddle mRight5 Icon_UnChecked {{=param.isChecked ? 'Icon_Checked' : ''}} "></span>
    </th>
    {{?}}
    <th width="20%">{{=_l('姓名/职位')}}</th>
    {{? _type === 'inActive' || _type === 'export' }}
    <th width="15%">{{=_l('部门')}}</th>
    {{??}}
    <th width="15%">{{=_l('原部门')}}</th>
    {{?}}
    <th width="15%">{{=_l('工作地点')}}</th>
    <th>{{=_l('工作电话/手机')}}</th>
    <th>{{=_l('邮箱')}}</th>
    {{? _type === 'inActive'}}
    <th width="100px" class="TxtCenter">{{=_l('操作')}}</th>
    {{?}}
</tr>
#}}

{{##def.buildUserList:param:
{{var list = param.list, _type = param.type;}}
{{~ list:user }}
<tr class="userItem">
    {{?_type === 'export' || _type ==='adjust'}}
    {{var checked = param.selected.indexOf(user.accountId) > -1;}}
    <td class="checkBox">
        <span class="check TxtMiddle mRight5 Icon_UnChecked {{= checked ? 'Icon_Checked' : ''}}"
              data-accountid="{{= user.accountId }}"></span>
    </td>
    {{?}}
    <td>
        <table class="w100" style="table-layout: fixed;">
            <tr>
                <td width="38px"><img class="avatar" src="{{= user.avatar}}" data-accountid="{{= user.accountId }}">
                </td>
                <td>
                    <div class="name" title="{{!user.fullname || '' }}">
                        {{!user.fullname || ''}}
                        {{? user.isDepartmentChargeUser }}
                        <span class="icon-ic-head Font16 mLeft5 chargeIcon"></span>
                        {{?}}
                    </div>
                    <div class="job" title="{{!user.job || '' }}">{{!user.job || '' }}</div>
                </td>
            </tr>
        </table>
    </td>
    <td><span class="dept">{{! user.department || ''}}</span></td>
    <td>
        <div class="workSite" title="{{!user.workSite || '' }}">{{!user.workSite || '' }}</div>
    </td>
    <td>
        <div><span>{{= user.contactPhone || ''}}</span></div>
        <div>
            {{? user.mobilePhone}}
            <span>{{=user.mobilePhone}}</span>
            {{?? user.isPrivateMobile }}
            <span title="{{=_l('保密')}}" class="overflow_ellipsis">*********</span>
            {{?}}
        </div>
    </td>
    <td>
        {{? user.email}}
        <span class="email" title="{{= user.email}}">{{= user.email }}</span>
        {{?? user.isPrivateEmail }}
        <span title="{{=_l('保密')}}" class="overflow_ellipsis">*********</span>
        {{?}}
    </td>
    {{? _type === 'inActive' }}
    <td class="TxtCenter">
        <span class="ThemeColor3 Hand reInvite mRight5" data-account="{{= user.accountId || user.account }}">{{=_l('重新邀请')}}</span>
        <span class="ThemeColor3 Hand cancelInvite" tip
              data-account="{{=  user.accountId || user.account }}"><span
            class="icon-closeelement-bg-circle Hand Font16"></span></span>
    </td>
    {{?}}
</tr>
{{~}}
#}}
